#ifndef _COMMAND_FACTORY_H_
#define _COMMAND_FACTORY_H_ 1
#include <string>
#include "command.h"
#include "editor.h"
#include "environ.h"
#include "history.h"
#include "spell.h"
class CommandFactory{
public:
  CommandFactory(Editor *editor,CommandHistory *history,std::string LEXICON_DIR);
  ~CommandFactory();
  Command * 
  create_ACommand(Position pos,std::string content);
  Command * 
  create_DCommand(Position pos,int len);
  Command * 
  create_SCommand();
  Command * 
  create_LanCommand(std::string lang);
  Command * 
  create_ContextCommand(std::string format);
  Command * 
  create_LCommand(int n);
  Command * 
  create_UCommand();
  Command * 
  create_RCommand();
  Command * 
  create_MDCommand(int n,std::string cmd_name);
  Command * 
  create_MCommand(std::string cmd_name);
  Command * 
  create_SPCommand();
  Command * 
  create_SPACommand();
  Command * 
  create_SPMCommand();
private:
  Editor *editor;
  Environ *environ;
  CommandHistory *history;
  SpellChecker *sc;
};
#endif
